import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { SkExperienceVO, SkExperienceForm, SkExperienceQuery } from '@/api/app/SkExperience/types';

/**
 * 查询经验信息LOG列表
 * @param query
 * @returns {*}
 */

export const listSkExperience = (query?: SkExperienceQuery): AxiosPromise<SkExperienceVO[]> => {
  return request({
    url: '/app/SkExperience/list',
    method: 'get',
    params: query
  });
};

/**
 * 查询经验信息LOG详细
 * @param id
 */
export const getSkExperience = (id: string | number): AxiosPromise<SkExperienceVO> => {
  return request({
    url: '/app/SkExperience/' + id,
    method: 'get'
  });
};

/**
 * 新增经验信息LOG
 * @param data
 */
export const addSkExperience = (data: SkExperienceForm) => {
  return request({
    url: '/app/SkExperience',
    method: 'post',
    data: data
  });
};

/**
 * 修改经验信息LOG
 * @param data
 */
export const updateSkExperience = (data: SkExperienceForm) => {
  return request({
    url: '/app/SkExperience',
    method: 'put',
    data: data
  });
};

/**
 * 删除经验信息LOG
 * @param id
 */
export const delSkExperience = (id: string | number | Array<string | number>) => {
  return request({
    url: '/app/SkExperience/' + id,
    method: 'delete'
  });
};
